﻿<Window x:Class="OpenExpressApp.Server.WPFHost.HostWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:av="http://schemas.codeplex.com/wpfcontrib/xaml/presentation"
    Title="服务器控制台" Height="376" Width="493" Loaded="Window_Loaded" Closed="Window_Closed" StateChanged="Window_StateChanged" Closing="Window_Closing">
    <Window.Resources>
        <Storyboard x:Key="IconAnimation">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Icon" Storyboard.TargetName="notifyIcon" Duration="0:0:2" RepeatBehavior="Forever">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                    <DiscreteObjectKeyFrame.Value>
                        <ImageSource>/OpenExpressApp.Server.WPFHost;component/Images/S1.ico</ImageSource>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1">
                    <DiscreteObjectKeyFrame.Value>
                        <ImageSource>/OpenExpressApp.Server.WPFHost;component/Images/S2.ico</ImageSource>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <DockPanel>
        <av:NotifyIcon Name="notifyIcon" Icon="/OpenExpressApp.Server.WPFHost;component/Images/S1.ico" Text="指标服务器" DoubleClick="ShowHostWindow">
            <FrameworkElement.ContextMenu>
                <ContextMenu>
                    <MenuItem Name="MIConfig" Header="配置" Click="MIConfig_Click"/>
                    <MenuItem Header="开启服务" Click="StartService" />
                    <MenuItem Header="停止服务" Click="StopService" />
                    <Separator></Separator>
                    <MenuItem Header="打开控制台" Click="ShowHostWindow"/>
                    <MenuItem Header="关闭" Click="CloseHostWindow" />
                </ContextMenu>
            </FrameworkElement.ContextMenu>
        </av:NotifyIcon>
        <Label DockPanel.Dock="Top">日志:</Label>
        <ListBox DockPanel.Dock="Top" Name="log"/>
    </DockPanel>
</Window>
